#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <aclconio.h>
#include <define.h>
#include <transact.h>
#include <tran.h>
#include <gds.h>
#include <sizes.h>
#include "ConfProto.h"
#include "tblutil.h"
#include <\SOFTPAY\Ver30\source\include\sizes.h>
#include <\SOFTPAY\Ver30\HostSrc\citisrc\citiids.h>
#include <\SOFTPAY\Ver30\HostSrc\cpacsrc\cpacids.h>
#include <confio.h>

#include <\SOFTPAY\Ver30\source\include\MCT.h>

const char*MCTName = "MCT.dat";

static MCT_REC srMCTRec;

static int recordNum;
int	inLoadMCTRec (int inRecNumber)
{
	int inRet;

	inRet = inLoadConfRec(MCT_FILENAME, SIZE_MCT_REC, inRecNumber, (char *) &srMCTRec);

	recordNum = inRecNumber;
	return inRet;
}

void *pvdGetMCTRec(void)
{
	return &srMCTRec;

}

int	inSaveMCTRec (int inRecNumber)
{
	int inRet;

	inRet = inSaveConfRec(MCT_FILENAME, SIZE_MCT_REC, inRecNumber, (char *) &srMCTRec);

	return inRet;
}

int	inGetMCTRecNumber (void)
{
	return recordNum;
}

int	inUpdateMCTRec (void)
{
	int inRet;

	inRet = inSaveConfRec(MCT_FILENAME, SIZE_MCT_REC, recordNum, (char *) &srMCTRec);

	return inRet;
}

void	vdResetMCTRec (void)
{
	memset((void*)&srMCTRec, 0, REC_SIZEOF(srMCTRec));
}

long lnGetDestMAN(void)
{
	return srMCTRec.lnDestMAN;
}

void vdSetDestMAN(long lnDestMAN)
{
	srMCTRec.lnDestMAN = lnDestMAN;
}

long lnGetSecondaryMAN(void)
{
	return srMCTRec.lnSecondaryMAN;
}

void vdSetSecondaryMAN(long lnSecondaryMAN)
{
	srMCTRec.lnSecondaryMAN = lnSecondaryMAN;
}

long lnGetDestSettleMAN(void)
{
	return srMCTRec.lnDestSettleMAN;
}

void vdSetDestSettleMAN(long lnDestSettleMAN)
{
	srMCTRec.lnDestSettleMAN = lnDestSettleMAN;
}

long lnGetSecSettleMAN(void)
{
	return srMCTRec.lnSecSettleMAN;
}

void vdSetSecSettleMAN(long lnSecSettleMAN)
{
	srMCTRec.lnSecSettleMAN = lnSecSettleMAN;
}

short shGetMBTXBaudRate(void)
{
	return srMCTRec.shMBTXBaudRate;
}

void vdSetMBTXBaudRate(short shMBTXBaudRate)
{
	srMCTRec.shMBTXBaudRate = shMBTXBaudRate;
}

short shGetMBTXDataFormat(void)
{
	return srMCTRec.shMBTXDataFormat;
}

void vdSetMBTXDataFormat(short shMBTXDataFormat)
{
	srMCTRec.shMBTXDataFormat = shMBTXDataFormat;
}

short shGetMBTXTimeout(void)
{
	return srMCTRec.shMBTXTimeout;
}

void vdSetMBTXTimeout(short shMBTXTimeout)
{
	srMCTRec.shMBTXTimeout = shMBTXTimeout;
}

short inGetRSSIThreshold(void)
{
	return srMCTRec.inRSSIThreshold;
}

void vdSetRSSIThreshold(short inRSSIThreshold)
{
	srMCTRec.inRSSIThreshold = inRSSIThreshold;
}

short shGetMBTXParity(void)
{
	return srMCTRec.shMBTXParity;
}

void vdSetMBTXParity(short shMBTXParity)
{
	srMCTRec.shMBTXParity = shMBTXParity;
}

VS_BOOL fGetDialBackup(void)
{
	return srMCTRec.fDialBackup;
}

void vdSetDialBackup(VS_BOOL fDialBackup)
{
	srMCTRec.fDialBackup = fDialBackup;
}

VS_BOOL fGetWirelessHost(void)
{
	return srMCTRec.fWirelessHost;
}

void vdSetWirelessHost(VS_BOOL fWirelessHost)
{
	srMCTRec.fWirelessHost = fWirelessHost;
}

